package org.farng.mp3.id3;

import org.farng.mp3.InvalidTagException;
import org.farng.mp3.object.ObjectNumberVariableLength;

import java.io.IOException;


/**
 * Title: Description: Copyright:    Copyright (c) 2002 Company:
 *
 * @author Eric Farng
 * @version $Revision: 1.3 $
 */
public class FrameBodyPCNT extends AbstractID3v2FrameBody {
    /**
     * Creates a new FrameBodyPCNT object.
     */
    public FrameBodyPCNT() {
        //        this.setObject("Counter", new Long(0));
    }

    public FrameBodyPCNT(FrameBodyPCNT body) {
        super(body);
    }

    /**
     * Creates a new FrameBodyPCNT object.
     *
     * @param counter DOCUMENT ME!
     */
    public FrameBodyPCNT(long counter) {
        this.setObject("Counter", new Long(counter));
    }

    /**
     * Creates a new FrameBodyPCNT object.
     *
     * @param file DOCUMENT ME!
     *
     * @throws IOException DOCUMENT ME!
     * @throws InvalidTagException DOCUMENT ME!
     */
    public FrameBodyPCNT(java.io.RandomAccessFile file)
                  throws IOException, InvalidTagException {
        this.read(file);
    }

    /**
     * DOCUMENT ME!
     *
     * @return DOCUMENT ME!
     */
    public String getIdentifier() {
        return "PCNT";
    }

    /**
     * DOCUMENT ME!
     */
    protected void setupObjectList() {
        objectList.add(new ObjectNumberVariableLength("Counter", 4));
    }
}